<div class="add_category">
    <a href="/admin/category/">Категории</a> &rarr; Сортировка
</div>
{literal}<script>
$(function() {
    $("ul#order").sortable({ opacity: 0.5, cursor: 'move', update: function() {
        var order = $(this).sortable("serialize") + '&action=updateRecordsListings&type=sort'; 
        $.ajax({
            url: "/admin/category/sort/",
            cache: false,
            type: "POST",
            data: order,
            dataType: "text",
            beforeSend: function(){
                $('div.loading').show();
            },
            complete: function(){
                $('div.loading').hide();
            },
            success: function(resp){
                $("div.success").show().html(resp).fadeOut(1000);
            }
        });										 
    }});
});
</script>{/literal}
<div id="content">
		<div id="inner">
            <ul id="order">
			{foreach from=$category item=doc}
				<li id="recordsArray_{$doc.id}"><img src="/res/img/admin/category.gif" class="left" /> {$doc.name}
                    {if $doc.parent}
                    <ul>
    				{foreach from=$doc.parent item=parent}
                        <li><img src="/res/img/admin/sub_category_icon.gif" /> <img src="/res/img/admin/subcategory.gif" class="left" /> {$parent.name}</li>
    				{/foreach}
                     </ul>
                    {/if}</li>
			{/foreach}
            </ul>
		</div>
</div>
<div class="loading px150 center paddingtb paddinglr" style="text-align: center; margin-top: 20px;"><img src="/res/img/admin/preloader.gif" /><br />Отправка данных....</div>
<div class="success"></div>